#include "../../rs_util/src/log.h"
#include "server.h"

Server::Server()
{

}

Server::~Server()
{

}

int Server::start(int argc, char **argv)
{
    if(!parseCommandLine(argc, argv)){
        LOG_ERROR() << "Parse command line.";

        return -1;
    }

    if(!init()){
        LOG_ERROR() << "Server init.";

        return -1;
    }

    return run();
}

bool Server::parseCommandLine(int argc, char **argv)
{
    LOG_TRACE() << "Server start argument count: " << argc;

    for(int i = 0; i < argc; ++i){
        LOG_TRACE() << "Argument " << i + 1 << ": " << argv[i];
    }

    return true;
}

bool Server::init()
{
    return true;
}

int Server::run()
{
    return 0;
}
